package com.itc.bpm.bean;

import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.itc.common.core.validate.Add;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 流程模型定义实体
 */
@Data
@TableName("bpm_model")
public class BpmModel extends BaseDO{
    @TableId
    private Long id;
    @ApiModelProperty(value = "流程名称")
    @NotNull(message = "流程名称不能为空",groups = Add.class)
    @TableField(condition = SqlCondition.LIKE)
    private String bpmName;
    @NotNull(message = "流程key不能为空",groups = Add.class)
    @ApiModelProperty(value = "流程key")
    @TableField(condition = SqlCondition.LIKE)
    private String bpmKey;
    @NotNull(message = "流程分类不能为空",groups = Add.class)
    @ApiModelProperty(value = "流程分类")
    private String category;
    @ApiModelProperty(value = "版本号")
    private String version;
    @ApiModelProperty(value = "流程文件")
    private String bpmnXml;
    @ApiModelProperty(value = "流程描述")
    private String description;
    @ApiModelProperty(value = "流程表单编码")
    private String formCode;
    @ApiModelProperty(value = "流程是否部署 0 未部署 1 已部署")
    private Integer isDeploy;
    @ApiModelProperty(value = "状态 0 正常 1 历史版本 列表只展示最新版本")
    private Integer status;
    @ApiModelProperty(value = "负责人")
    private String assigner;
    @ApiModelProperty(value = "数据集")
    private String dataSet;
    @ApiModelProperty(value = "流程责任部门")
    private String department;
    @ApiModelProperty(value = "流程席位")
    private String deptChild;

    @ApiModelProperty(value = "流程标签")
    private String label;
    @ApiModelProperty(value = "流程语音提示")
    private String voiceType;
    @ApiModelProperty(value = "是否常用流程")
    private Integer isPublicProcess;
    @ApiModelProperty(value = "是否重要事件展示")
    private Integer isImportantEvent;
    @ApiModelProperty(value = "部署id")
    private String deployId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "部署时间")
    private Date deployDate;
    @ApiModelProperty(value = "是否启用 0 启用 1 停用")
    private Integer useStatus;
    @ApiModelProperty(value = "当前流程级别")
    private String currentLevel;
    @ApiModelProperty(value = "是否升级流程")
    private Integer isUpProcess;
    @ApiModelProperty(value = "是否降级流程")
    private Integer isDownProcess;
    @ApiModelProperty(value = "升级流程配置json")
    private String upProcess;
    @ApiModelProperty(value = "降级流程json")
    private String downProcess;
    @ApiModelProperty(value = "基础信息展示指标json")
    private String baseInfo;

    @ApiModelProperty(value = "type 0 航班类 1 告警类")
    @TableField(exist = false)
    private Integer type;

    @ApiModelProperty(value = "-1 未开始 0 进行中，1 已完成，2 已取消")
    @TableField(exist = false)
    private Integer isStartStatus;

    @ApiModelProperty(value = "条件组合json（ 所有设计的条件表达式组合）")
    private String conditionJson;


}
